using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

// comments.. and more
namespace Ltf.Remoting.Server
{
	[Flags]
	public enum FileType
	{
		None = 0,
		Unversioned = 1,
		Versioned = Unversioned*2,
		CheckedIn = Versioned*2,
		CheckedOut = CheckedIn*2,
		Added = CheckedOut * 2,
		Locked = Added * 2,
		Conflict = Locked*2,
		OutOfDate = Conflict*2,
		SingleFile = OutOfDate*2,
		TwoFiles = SingleFile*2,
		SingleFolder = TwoFiles*2,
		Mixed = SingleFolder*2,
		AllFiles = Mixed*2,
		AllFolders = AllFiles*2,
		SingleItem = AllFolders*2,
		InWorkspace = SingleItem * 2,
		NotInWorkspace = InWorkspace * 2,
	}

	[Serializable]
	[AttributeUsage(AttributeTargets.Method)]
	public class ContextMenuAttribute : System.Attribute
	{
		public string Name;
		public string Text;
		public FileType TypeRequirements;
		public FileType DisabledRequirements;
		public bool Disabled = false;

		public ContextMenuAttribute(string name, string text)
			: this(name, text, FileType.None, FileType.None)
		{ }

		public ContextMenuAttribute(string name, string text,
			FileType typeRequirements)
			: this(name, text, typeRequirements, FileType.None)
		{ }

		public ContextMenuAttribute(string name, string text,
			FileType typeRequirements, FileType disabledRequirements)
		{
			Name = name;
			Text = text;
			TypeRequirements = typeRequirements;
			DisabledRequirements = disabledRequirements;
		}
	}

	public enum ContextMenuUsage
	{
		None = 0,
		ExplorerOnly = 1,
		ReviewOnly = 2,
		ExplorerAndReview = 3
	}

	[Serializable]
	[AttributeUsage(AttributeTargets.Method)]
	public class ContextMenuUsageAttribute : System.Attribute
	{
		public ContextMenuUsage Usage;

		public ContextMenuUsageAttribute(ContextMenuUsage usage)
		{
			Usage = usage;
		}
	}
}
